package com.ae.putingotdown;

import com.ae.putingotdown.block.Register;
import com.ae.putingotdown.net.ModNetWork;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod(ModConstant.MOD_ID)
public class PutIngotDown {
    public PutIngotDown() {
        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
        bus.addListener(this::setup);
        ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.CONFIG);
        ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, Config.CLIENT_CONFIG);
        Register.BLOCK.register(bus);
        Register.TILE_ENTITY.register(bus);
    }

    public void setup(final FMLCommonSetupEvent event) {
        ModNetWork.register();
    }
}
